package com.hotel.mapper;

import com.hotel.bean.Employee;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    //添加
    int insert(Employee employee);
    //根据eid删除
    int deleteByEid(Integer eid);
    //根据eid修改
    int update(Employee employee);
    //根据eid查询
    Employee selectByEid(Integer eid);
    //查询所有
    List<Employee> selectAll(String ename);
    //获取某个员工下的所有部门did
    List<Integer> selectDidByEid(Integer eid);
    //删除某个员工和所有部门
    void deleteEidAndDidByEid(Integer eid);
    //添加某个员工和全部部门
    void insertEidAndDid(@Param("eid") Integer eid,@Param("dids") Integer[] dids);

}
